{% extends 'base1.html' %}

{% block title %}
    部门管理
{% endblock %}

{% block label %}
    <h1 class="page_header">
        部门管理
        <a class="btn btn-default pull-right" href="/add_department/">添加</a>
    </h1>
{% endblock %}

{% block contenter %}
    <div class="row">
                <div class="col-lg-12">
                    <div class="row">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>部门名称</th>
                                <th>部门描述</th>
                                <th>部门操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for d in d_list %}
                            <tr>
                                <td class="col-lg-4">{{ d.name }}</td>
                                <td class="col-lg-4">{{ d.desc }}</td>
                                <td class="col-lg-4">
                                    <a class="btn btn-default" href="/edit_department/{{d.id}}/">编辑</a>
                                    <a class="btn btn-default" href="/delete_department/{{d.id}}/">删除</a>
                                    <a class="btn btn-default" href="/detail_person/?id={{ d.id }}/">查看职位</a>
                                </td>
                            </tr>
                            {% endfor %}
                        </table>
                    </div>
                </div>
                <!-- /.col-lg-12 -->
            </div>
{% endblock %}
